import java.util.Scanner;
import java.util.Stack;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        int n = in.nextInt();
        StringBuilder stringBuilder = new StringBuilder();
        Stack<Integer> stack1 = new Stack<>();
        Stack<Integer> stack2 = new Stack<>();

        while(n != 0){
            stack1.push(n % 10);
            n = n / 10;
        }
        while(!stack1.isEmpty()){
            stack2.push(stack1.pop());
        }
        int count = 0;
        while(!stack2.isEmpty()){
            if(count < 3) {
                stringBuilder.append(stack2.pop());
                count++;
            }else {
                stringBuilder.append(",");
                count = 0;
            }

        }
        System.out.println(stringBuilder.reverse());
    }
}